package com.xtck.ha.fault.modules.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xtck.ha.fault.modules.pojo.entity.FmeaInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @ClassName: FmeaInfoDAO
* @Description: 数据访问接口
* @author liuyuan
* @date 2025-06-17
*/
@Mapper
@Repository
public interface FmeaInfoDAO extends BaseMapper<FmeaInfo> {
    @Select("" +
            "SELECT * FROM FAULT_SYS.FMEA_INFO a WHERE 1=1   " +
            "AND a.task_id=#{taskId} " +
            "order by create_time desc " +
            "limit 1; ")
    FmeaInfo selectByTaskId(@Param("taskId") long taskId);
}